{% extends 'base.html' %}

{% block content %}
<div class="container-fluid">
    <h1 class="dash-title">编辑台网 {{ network }}</h1>
    <div class="row">
        <div class="col-xl-6">
            <div class="card spur-card">
                <div class="card-header">
                    <div class="spur-card-icon">
                        <i class="fas fa-chart-bar"></i>
                    </div>
                    <div class="spur-card-title"> 台网信息 </div>
                </div>
                <div class="card-body ">
                    <form method="POST" novalidate>
                        {% include 'basic/include/network_form.html' %}
                        <button type="reset" class="btn btn-secondary">重置</button>
                        <button type="submit" class="btn btn-primary">保存</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock content %}



{% block javascript %}
<script>
    $(document).ready(function () {
        $("input[id='id_code']").bind('input propertychange', function () {
            console.log($(this).val().replace(/[_\W]+/g, "-").toLowerCase())
            $("input[id='id_slug']").val($(this).val().replace(/[\W]+/g, "-").toLowerCase());
        });
    });
</script>

{% endblock javascript %}